﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ajaxGameEngine.aspx.vb" Inherits="projectBiome.ajaxGameEngine" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../Team Ghana/ghanaStylin.css" />
    <style type="text/css">
        .style4
        {
            height: 64px;
            width: 97px;
        }
        .style5
        {
            height: 64px;
            width: 112px;
        }
#overlay {
     visibility: hidden;
     position: absolute;
     left: 0px;
     top: 0px;
     width:100%;
     height:100%;
     text-align:center;
     z-index: 1000;
}
#overlay div {
     width:300px;
     margin: 100px auto;
     background-color: #fff;
     border:1px solid #000;
     padding:15px;
     text-align:center;
}
    </style>
     <script type ="text/javascript">
         function overlay() {
             el = document.getElementById("overlay");
             el.style.visibility = (el.style.visibility == "visible") ? "hidden" : "visible";
         }
    </script>
</head> 
<body style="height: 622px; width: 1655px">
    <form id="form1" runat="server">

       <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"/>
       <%-- <asp:Timer runat="server" id="UpdateTimer" interval="10000" ontick="UpdateTimer_Tick" />
        <asp:UpdatePanel runat="server" id="TimedPanel" updatemode="Conditional">
            <Triggers>
                <asp:AsyncPostBackTrigger controlid="UpdateTimer" eventname="Tick" />
            </Triggers>
        </asp:UpdatePanel>--%>
    
    <div style="height: 286px; width: 1138px;">
        <table style="height: 110%; width:84%;" border="20" cellpadding="5" 
            align="left" cellspacing="10">
            <tr>
            <td class="style4" align="center">
            <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
            <asp:Timer ID="Timer6" runat="server" ontick="isGameReady" interval="3000"> 
                            </asp:Timer>
            <br />
            <br />
            <asp:Label ID="Player1" runat="server"></asp:Label>
                <img alt="" src="../Team Ghana/team1.gif" style="width: 67px; height: 70px;" id="imgPlayer1" />
            <br />
            <br />

            <asp:Button ID="btnRefresh1" runat="Server" Text="Sit" OnClick="btnsit1click" /><br />

            
            
                <asp:Label ID="Playerg1" runat="server" style="position: relative"></asp:Label>

            
            
            </ContentTemplate>
            
            </asp:UpdatePanel>
            
            </td>
            <td class="style4" align="center">
            <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
            &nbsp;<br />
            <br />
            <asp:Label ID="Player2" runat="server"></asp:Label>
                <img alt="" src="../Team Ghana/team1.gif" style="width: 67px; height: 70px;" id="imgPLayer2" />
            <br />
            <br />
            <asp:Timer ID="Timer7" runat="server" ontick="isGameReady" interval="3000"> 
                            </asp:Timer>
            <asp:Button ID="btnRefresh2" runat="Server" Text="Sit" OnClick="btnsit2click"  Height="26px" /><br />

            
            
            
                <asp:Label ID="Playerg2" runat="server" style="position: relative"></asp:Label>

            
            
            
            </ContentTemplate>
            
                </asp:UpdatePanel>
            
            </td>
            <td class="style4" align="center">
            <asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
            <br />
            <br /><asp:Timer ID="Timer8" runat="server" ontick="isGameReady" interval="3000"> </asp:Timer>
            <asp:Label ID="Player3" runat="server"></asp:Label>
                <img alt="" src="../Team Ghana/team1.gif" style="width: 67px; height: 70px;" id="imgPLayer3" />
            <br />
            <br />
            <asp:Button ID="btnRefresh3" runat="Server" Text="Sit" OnClick="btnsit3click" 
                     /><br />
            
            
                <asp:Label ID="Playerg3" runat="server" style="position: relative"></asp:Label>
            
            
            </ContentTemplate>
            
            </asp:UpdatePanel>
            
            </td>
            <td class="style4" align="center">
            <asp:UpdatePanel ID="UpdatePanel4" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
            &nbsp;<br />
            <br /><asp:Timer ID="Timer9" runat="server" ontick="isGameReady" interval="3000"> </asp:Timer>
            <asp:Label ID="Player4" runat="server"></asp:Label>
                <img alt="" src="../Team Ghana/team1.gif" style="width: 67px; height: 70px;" id="imgPLayer4" />
            <br />
            <br />
            <asp:Button ID="btnRefresh4" runat="Server" Text="Sit" OnClick="btnsit4click" 
                     /><br />
            
            
                <asp:Label ID="Playerg4" runat="server" style="position: relative"></asp:Label>
            
            
            </ContentTemplate>
            
            </asp:UpdatePanel>
            
            </td>
            <br />
             <td class="style5" align="center">
            <asp:UpdatePanel ID="UpdatePanel14" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
            &nbsp;<br />
            <br /><asp:Timer ID="Timer10" runat="server" ontick="isGameReady" interval="3000"> </asp:Timer>
            <asp:Label ID="lblPlayer5" runat="server"></asp:Label>
                <img alt="" src="../Team Ghana/team1.gif" style="width: 67px; height: 70px;" id="imgPLayer5" />
            <br />
            <br />
            <asp:Button ID="btnRefresh5" runat="Server" Text="Sit" OnClick="btnsit4click" 
                     /><br />
            
            
                <asp:Label ID="Playerg5" runat="server" style="position: relative"></asp:Label>
            
            
            </ContentTemplate>
            
            </asp:UpdatePanel>
            
            </tr>
            <tr>
            <br />
             <td class="style4" align="center">
                 &nbsp;<td class="style4" align="center">
                    &nbsp;<td class="style4" align="center">
                    &nbsp;<td class="style4" align="center">
                    &nbsp;<td class="style5" align="center">

                    &nbsp;</tr>
        </table>
   <asp:UpdatePanel ID="UpdatePanel5" runat="server">
                        <ContentTemplate>
                            <asp:Timer ID="Timer5" runat="server" ontick="isGameReady" interval="2000"> 
                            </asp:Timer>
                            # of Players<asp:Label ID="lblPlayerCount" runat="server" Font-Bold="True" 
                                Font-Size="Large" ForeColor="Red"></asp:Label>
                            <asp:Button ID="btnAjaxStartGame" runat="server" Enabled="False" 
                                Text="Start Game" />
                            <br />
                        </ContentTemplate>
                    </asp:UpdatePanel>   
            <asp:Panel ID="Panel3" runat="server" BorderColor="Black" 
            BorderStyle="Double" 
            
            
            style="z-index: 1; left: 1092px; top: 431px; position: absolute; height: 357px; width: 424px">
                <asp:Label ID="Label1" runat="server" Text="Players in  Game" Font-Bold="True" 
                    Font-Size="XX-Large"></asp:Label>
                <asp:UpdatePanel ID="UpdatePanel13" runat="server">
                    <ContentTemplate>
                        <asp:Timer ID="Timer4" runat="server">
                        </asp:Timer>
                        <asp:GridView ID="GridView1" runat="server" BorderColor="Black" 
                            BorderStyle="Double" CellPadding="4" ForeColor="#333333" GridLines="None">
                            <AlternatingRowStyle BackColor="White" />
                            <EditRowStyle BackColor="#2461BF" />
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <RowStyle BackColor="#EFF3FB" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <SortedAscendingCellStyle BackColor="#F5F7FB" />
                            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                            <SortedDescendingCellStyle BackColor="#E9EBEF" />
                            <SortedDescendingHeaderStyle BackColor="#4870BE" />
                        </asp:GridView>
                    </ContentTemplate>
                </asp:UpdatePanel>
        </asp:Panel>
      
            </div>
            <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />

            <br /><br /><br />
                        <div id="overlay">
                <div>
                    <asp:Button ID="drawOptionBtn" runat="server" Text="Draw Option Card" /> </br>
                    <asp:Button ID="drawCommonsBtn" runat="server" Text="Draw Commons" />
                </div>
                <div>
                CardID: <br/>
                    <asp:TextBox ID="cardIDtxt" runat="server"></asp:TextBox> <br/>
                    <asp:Label ID="cardNameLbl" runat="server" Text="Label"></asp:Label>
                    <asp:Label ID="cardDescriptionLbl" runat="server" Text="Label"></asp:Label>
                    <p> Would You like to Play that Card?</p>
                                <asp:Button ID="btnPlayNormal" runat="server" OnClick="btnPlayNormal_Click" 
                                    Text="Play Normal Card" Width="150px" />
                </div>
            </div>
            <br /><br /><br />
            
            <div id="pleasekillme">
                
                <asp:UpdatePanel ID="upPnlSystems" runat="server" updateMode="Conditional" >
                 <ContentTemplate >
                 <asp:Timer runat="server" id="Timer3" interval="3000" ontick="Timer3_Tick" />
                      <asp:GridView ID="gvSys" runat="server" AutoGenerateColumns="false">
                        <Columns>
                            <asp:BoundField DataField="System Name" HeaderText="System Name" />
                            <asp:BoundField DataField="Attribute Name" HeaderText="Attribute Name" />
                            <asp:BoundField DataField="Value" HeaderText="Value" />
                        </Columns>
                    </asp:GridView>
                 <br />                    
                 </ContentTemplate>
                </asp:UpdatePanel>
                <asp:Button ID="btnTest" runat="server" TExt="Test updating gvSys"/>
                
            </div>

        <div style="text-align:center; margin-top:50px">

            <asp:UpdatePanel ID="UpdatePanel12" runat="server">
                <ContentTemplate>
         
                    <asp:Panel ID="Panel2" runat="server" 
                        
                        style="z-index: 1; left: 464px; top: 527px; position: absolute; height: 399px; width: 570px">
                        <asp:UpdatePanel ID="ajaxPnlCardsInPlay" runat="server">
                
                            <ContentTemplate>
                            <asp:Timer runat="server" id="Timer2" interval="4000" ontick="timer2tick" />

                                <a href="#" onclick="overlay()">Draw a Card</a><br />
                              
                                <asp:Button ID="btnHide" runat="server" OnClick="showCards" Text="Show Cards" 
                                    Width="150px" />
                                <asp:Button runat="server" OnClick="btnLeaveGame_click" Text="Leave Game" 
                                    Width="150px" ID="btnLeaveGame" />
                                <br />
                                <br />
                                <asp:GridView ID="gvCardsInPlay" runat="server" BackColor="White" align="center"
                                    BorderColor="Black" BorderStyle="Solid" BorderWidth="25px" CellPadding="4" 
                                    ForeColor="Black" GridLines="Horizontal" Visible="False" 
                                    Caption="Cards in Play" CaptionAlign="Top">
                                    <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                                    <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                                    <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                                    <SortedAscendingCellStyle BackColor="#F7F7F7" />
                                    <SortedAscendingHeaderStyle BackColor="#4B4B4B" />
                                    <SortedDescendingCellStyle BackColor="#E5E5E5" />
                                    <SortedDescendingHeaderStyle BackColor="#242121" />
                                </asp:GridView>
                                
                                
                                
                                
                                
                                
                                
                                <br />
                                
                                
                                
                                
                                
                                
                                
                            </ContentTemplate>
                        </asp:UpdatePanel>

                    </asp:Panel>
                    
                  
                </ContentTemplate>
               
            </asp:UpdatePanel>
            
        </div>
    
     
                <div style="text-align: center; margin-top: 20px">
                
                    <asp:TextBox ID="txtChat" runat="server" 
                        
                        style="margin-left: 0px; position: relative; top: 594px; left: -565px; width: 452px;"></asp:TextBox>
                    <asp:Button ID="btnSendMsg" runat="server" Text="Send" 
                        style="position: relative; top: 596px; left: -550px" />
                    <br />
                    </div>
              
            <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
       <asp:UpdatePanel ID="UpdatePanel11" runat="server">
           <ContentTemplate>
           
        <br /> 
        <asp:Timer runat="server" id="Timer1" interval="1000" ontick="Timer1_Tick" />
           
               <asp:ListBox ID="lstChat" runat="server" Height="168px" Rows="10" Width="540px" 
                   DataValueField="Message">
               </asp:ListBox>
           </ContentTemplate>
       </asp:UpdatePanel>
       <br /><br /><br />
       <asp:GridView ID="gvdGcard" runat="server" 
           style="position: relative; top: 50px; left: 721px">
       </asp:GridView>
       <asp:Button ID="btnGcard" runat="server" 
           style="position: relative; top: -128px; left: 742px; width: 120px" 
           Text="Show Goal Cards" />
       <br /><br /><br />

    </form>
    </body>
    </html>